import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router"
const history = createWebHistory()

const routes: Array<RouteRecordRaw> = [
    {
        path: '/',
        redirect: "home"
    },
    {
        path: "/home",
        name: "home",
        component: () => import('../views/Home.vue')
    },
    {
        path: "/write",
        name: "write",
        component: () => import('../views/Write.vue')
    },
    {
        path: '/post',
        name: "post",
        component: () => import('../views/Post.vue')
    }
]

const router = createRouter({
    history,
    routes
})

export default router